package cn.foolishbird.crow.mybatis.plus.po;


import cn.foolishbird.crow.core.IdSObject;
import cn.foolishbird.crow.enumeration.WhetherEnum;
import com.baomidou.mybatisplus.annotation.*;

/**
 * @author foolishbird
 * @since 2019-05-06
 */
public abstract class CrowPO extends IdSObject<Long> {

    private static final long serialVersionUID = 1299456273851098539L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    protected Long id;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    protected Long createTime;

    /**
     * 创建者
     */
    @TableField(value = "create_by", fill = FieldFill.INSERT)
    protected Long createBy;

    /**
     * 修改时间
     */
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    protected Long updateTime;

    /**
     * 修改者
     */
    @TableField(value = "update_by", fill = FieldFill.INSERT_UPDATE)
    protected Long updateBy;

    /**
     * 逻辑删除字段
     */
    @TableLogic
    @TableField(value = "del_flag", fill = FieldFill.INSERT)
    protected WhetherEnum delFlag = WhetherEnum.NO;

    public CrowPO() {
    }

    @Override
    public Long id() {
        return this.id;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }

    public Long getCreateBy() {
        return createBy;
    }

    public void setCreateBy(Long createBy) {
        this.createBy = createBy;
    }

    public Long getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Long updateTime) {
        this.updateTime = updateTime;
    }

    public Long getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(Long updateBy) {
        this.updateBy = updateBy;
    }

    public WhetherEnum getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(WhetherEnum delFlag) {
        this.delFlag = delFlag;
    }


}
